<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>title</title>
  <script src="../vue.js"></script>
</head>
<body>
<div id="app">

  <h1>{{msg}}</h1>

<!--  遍历字符串-->
  <ul>
    <li v-for="(item,index) in str" :key="index">{{item}}</li>
  </ul>
  <hr>
<!--  遍历对象-->
  <ul>
    <li v-for="(value,keyName) in obj" :key="value.id">{{keyName}}---{{value}}</li>
  </ul>
  <hr>
<!--  遍历数字-->
  <p style="font-size: 20px;color: red" v-for="(item,index) in tel">{{item}}---{{index}}</p>

</div>

<script>
  Vue.config.productionTip = false;
  const vm = new Vue({
    el:'#app',
    data(){
      return{
        msg:'hello Vue~~~',
        str:'WDHNB',
        obj:{
          id:Date.now(),
          name:'wdh',
          age:18,
          hobby:'animation'
        },
        tel:10

      }
    }
  })
</script>

</body>
</html>